@extends('layout.home.index')

@section('css')
		<link href="/home/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="/home/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />

		<link href="/home/basic/css/demo.css" rel="stylesheet" type="text/css" />

		<link href="/home/css/seastyle.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript" src="/home/basic/js/jquery-1.7.min.js"></script>
		<script type="text/javascript" src="/home/js/script.js"></script>
@endsection

@section('content')

<div class="am-g am-g-fixed">
	<div class="am-u-sm-12 am-u-md-12">
  	<div class="theme-popover">														
		<div class="searchAbout">
			<span class="font-pale">相关搜索：</span>
			<a title="华硕" href="/search/search?search=华硕">华硕</a>
			<a title="联想" href="/search/search?search=联想">联想</a>
			<a title="戴尔" href="/search/search?search=戴尔">戴尔</a>

		</div>
		<ul class="select">
			<p class="title font-normal">
				<span class="fl">{{ $search }}</span>
				<span class="total fl">搜索到<strong class="num">{{ $count }}</strong>件相关商品</span>
			</p>
			<div class="clear"></div>
			
		<div class="clear"></div>
    </div>
		<div class="search-content">
			<div class="sort">
				<li class="first"><a title="综合" onclick="allorder('{{ session('search') }}')">综合排序</a></li>
				<li><a title="销量" onclick="salesd('{{ session('search') }}')">销量升序</a></li>
				<li><a title="销量" onclick="salesa('{{ session('search') }}')">销量降序</a></li>
				<li><a title="价格" onclick="priced('{{ $search }}')">价格升序</a></li>
				<li><a title="价格" onclick="pricea('{{ session('search') }}')">价格降序</a></li>
				
			</div>
			<div class="clear"></div>

			<ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes">
				@foreach($data as $key=>$value)
				
					<li onclick="datalist({{ $value['goods_id'] }})">
						<div class="i-pic limit">
							<img src="/images/admin/goods_pic/{{ $value['goods_datalist_pic1'] }}" width="200" height="200"/>											
							<p class="title fl">{{ $value['goods_title'] }}</p>
							<p class="price fl">
								<b style="color:#888888">累计评论</b>
								<strong style="color:#888888">1</strong>
							</p>
							
							<p class="price fl">
								<b>¥</b>
								<strong>{{ $value['goods_price'] }}</strong>
							</p>
							<p class="number fl">
								销量<span>{{ $value['goods_sales'] }}</span>
							</p>
							
							
						</div>
					</li>
				
				
				
				@endforeach
				
			</ul>
		</div>
		<div class="search-side">

			<div class="side-title">
				经典搭配
			</div>

			<li>
				<div class="i-pic check">
					<img src="images/cp.jpg" />
					<p class="check-title">萨拉米 1+1小鸡腿</p>
					<p class="price fl">
						<b>¥</b>
						<strong>29.90</strong>
					</p>
					<p class="number fl">
						销量<span>1110</span>
					</p>
				</div>
			</li>

		</div>
		<div class="clear"></div>
		<!--分页 -->
		<ul class="am-pagination am-pagination-right">
			<li class="am-disabled"><a href="#">&laquo;</a></li>
			<li class="am-active"><a href="#">1</a></li>
			<li><a href="#">2</a></li>
			<li><a href="#">3</a></li>
			<li><a href="#">4</a></li>
			<li><a href="#">5</a></li>
			<li><a href="#">&raquo;</a></li>
		</ul>

	</div>
</div>
			

<!--引导 -->
<div class="navCir">
	<li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
	<li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
	<li><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>	
	<li><a href="person/index.html"><i class="am-icon-user"></i>我的</a></li>					
</div>

<!--菜单 -->
<div class=tip>
	<div id="sidebar">
		<div id="wrap">
			<div id="prof" class="item">
				<a href="#">
					<span class="setting"></span>
				</a>
				<div class="ibar_login_box status_login">
					<div class="avatar_box">
						<p class="avatar_imgbox"><img src="images/no-img_mid_.jpg" /></p>
						<ul class="user_info">
							<li>用户名：sl1903</li>
							<li>级&nbsp;别：普通会员</li>
						</ul>
					</div>
					<div class="login_btnbox">
						<a href="#" class="login_order">我的订单</a>
						<a href="#" class="login_favorite">我的收藏</a>
					</div>
					<i class="icon_arrow_white"></i>
				</div>

			</div>
			<div id="shopCart" class="item">
				<a href="#">
					<span class="message"></span>
				</a>
				<p>
					购物车
				</p>
				<p class="cart_num">0</p>
			</div>
			<div id="asset" class="item">
				<a href="#">
					<span class="view"></span>
				</a>
				<div class="mp_tooltip">
					我的资产
					<i class="icon_arrow_right_black"></i>
				</div>
			</div>

			<div id="foot" class="item">
				<a href="#">
					<span class="zuji"></span>
				</a>
				<div class="mp_tooltip">
					我的足迹
					<i class="icon_arrow_right_black"></i>
				</div>
			</div>

			<div id="brand" class="item">
				<a href="#">
					<span class="wdsc"><img src="images/wdsc.png" /></span>
				</a>
				<div class="mp_tooltip">
					我的收藏
					<i class="icon_arrow_right_black"></i>
				</div>
			</div>

			<div id="broadcast" class="item">
				<a href="#">
					<span class="chongzhi"><img src="images/chongzhi.png" /></span>
				</a>
				<div class="mp_tooltip">
					我要充值
					<i class="icon_arrow_right_black"></i>
				</div>
			</div>

			<div class="quick_toggle">
				<li class="qtitem">
					<a href="#"><span class="kfzx"></span></a>
					<div class="mp_tooltip">客服中心<i class="icon_arrow_right_black"></i></div>
				</li>
				<!--二维码 -->
				<li class="qtitem">
					<a href="#none"><span class="mpbtn_qrcode"></span></a>
					<div class="mp_qrcode" style="display:none;"><img src="images/weixin_code_145.png" /><i class="icon_arrow_white"></i></div>
				</li>
				<li class="qtitem">
					<a href="#top" class="return_top"><span class="top"></span></a>
				</li>
			</div>

			<!--回到顶部 -->
			<div id="quick_links_pop" class="quick_links_pop hide"></div>

		</div>

	</div>
	<div id="prof-content" class="nav-content">
		<div class="nav-con-close">
			<i class="am-icon-angle-right am-icon-fw"></i>
		</div>
		<div>
			我
		</div>
	</div>
	<div id="shopCart-content" class="nav-content">
		<div class="nav-con-close">
			<i class="am-icon-angle-right am-icon-fw"></i>
		</div>
		<div>
			购物车
		</div>
	</div>
	<div id="asset-content" class="nav-content">
		<div class="nav-con-close">
			<i class="am-icon-angle-right am-icon-fw"></i>
		</div>
		<div>
			资产
		</div>

		<div class="ia-head-list">
			<a href="#" target="_blank" class="pl">
				<div class="num">0</div>
				<div class="text">优惠券</div>
			</a>
			<a href="#" target="_blank" class="pl">
				<div class="num">0</div>
				<div class="text">红包</div>
			</a>
			<a href="#" target="_blank" class="pl money">
				<div class="num">￥0</div>
				<div class="text">余额</div>
			</a>
		</div>

	</div>
	<div id="foot-content" class="nav-content">
		<div class="nav-con-close">
			<i class="am-icon-angle-right am-icon-fw"></i>
		</div>
		<div>
			足迹
		</div>
	</div>
	<div id="brand-content" class="nav-content">
		<div class="nav-con-close">
			<i class="am-icon-angle-right am-icon-fw"></i>
		</div>
		<div>
			收藏
		</div>
	</div>
	<div id="broadcast-content" class="nav-content">
		<div class="nav-con-close">
			<i class="am-icon-angle-right am-icon-fw"></i>
		</div>
		<div>
			充值
		</div>
	</div>
</div>
<script>
	window.jQuery || document.write('<script src="basic/js/jquery-1.9.min.js"><\/script>');
</script>
<script type="text/javascript" src="basic/js/quick_links.js"></script>

<div class="theme-popover-mask"></div>

<script>
	// 点击商品,进行跳转到详情
	function datalist(id){
		window.location.href="/goods/datalist?id="+id;
	}



	// 点击排序规则
	function priced(search) {
		window.location.href="/search/search?search="+search+"&desc=goods_price&order=desc";
	}
	
	function pricea(search) {
		window.location.href="/search/search?search="+search+"&desc=goods_price&order=asc";
	}

	// 点击排序规则
	function salesd(search) {
		window.location.href="/search/search?search="+search+"&desc=goods_sales&order=desc";
	}
	
	function salesa(search) {
		window.location.href="/search/search?search="+search+"&desc=goods_sales&order=asc";
	}

	function allorder(search) {
		window.location.href="/search/search?search="+search;
		
	}
	
	
</script>


@endsection